#include "application.h"

#include <QDebug>

namespace UNIX{
#include <unistd.h>
#include </usr/include/signal.h>
}

Application::Application()
{
    v_pid = -1;
}


void Application::setAuid(int id){
    v_auid = id;
}

void Application::setName(const QString &name){
    v_name = name;
}


void Application::setArgs(const QStringList &args){
    v_args = args;
}


void Application::setPID(int pid){
    v_pid = pid;
}

void Application::setSignalPort(int port){
    v_servicePort = port;
}


QString Application::getName() const {
    return v_name;
}

QStringList Application::getArguments() const{
    return v_args;
}

int Application::getPID() const {
    return v_pid;
}

int Application::getSignalPort() const {
    return v_servicePort;
}

int Application::getAuid() const {
    return v_auid;
}


void Application::kill(){
    UNIX::kill(v_pid, SIGKILL);
}
